﻿using System;


namespace Qetza.TeamFoundation.WorkItemQuery.Admin
{
    /// <summary>
    ///The work item query admin console application.
    /// </summary>
    static class WiqAdmin
    {
        #region Methods

        /// <summary>
        /// Console application entry point.
        /// </summary>
        /// <param name="args">
        /// The command line parameters.
        /// </param>
        /// <returns>
        /// <b>0</b> if no error occured; otherwise <b>1</b>;
        /// </returns>
        static int Main(string[] args)
        {
            // create engine and register commands
            var engine = new WiqAdminEngine(new ParameterValidator());
            engine
                .RegisterCommand(new CommandListWiq())
                .RegisterCommand(new CommandExportWiq())
                .RegisterCommand(new CommandImportWiq())
                .RegisterCommand(new CommandRenameWiq())
                .RegisterCommand(new CommandDeleteWiq());

            // run engine
            return engine.Run(args);
        }

        #endregion
    }
}
